# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=perl-net-libidn
pkgver=0.12
pkgrel=20
pkgdesc="Perl/CPAN Module Net::LibIDN"
arch=("loong64" "x86_64")
url="https://search.cpan.org/dist/Net-LibIDN/"
license=("GPL" "PerlArtistic")
depends=(perl libidn)
options=('!emptydirs')
source=("https://search.cpan.org/CPAN/authors/id/T/TH/THOR/Net-LibIDN-${pkgver}.tar.gz")
md5sums=('c3e4de2065009d67bcb1df0afb473e12')

build() {
  cd Net-LibIDN-${pkgver}

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd Net-LibIDN-${pkgver}

  make install DESTDIR="$pkgdir"

  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
